#include<iostream>
#include<sstream>
#include<cstdlib>
#include<math.h>

using namespace std;

inline bool isInteger(const std::string & s) {
   if(s.empty() || ((!isdigit(s[0])) && (s[0] != '.') && (s[0] != '-') && (s[0] != '+'))) return false ;

   char * p ;
   strtol(s.c_str(), &p, 10) ;
   return (*p == 0) ;
}

int main(int argc,char * argv[]){
  if(argc<2) {
    cerr<<"Usage: <input cols>\n";
    return 1;
  }
  int arg=0;
  int cols = atoi(argv[++arg]);
  float vec[cols];
  string line;
  int row = 0;
  while(getline(cin,line)){
    //cerr<<"Standardizing row "<<row<<endl;
    istringstream iss(line);
    float mean = 0;
    int n = 0;
    bool is_valid[cols];
    for(int j=0;j<cols;++j){
      string s;
      iss>>s; 
      if(isInteger(s)){
        vec[j] = atof(s.data());
        //if(vec[j]==0)cerr<<"Found "<<vec[j]<<" at row "<<row<<" col "<<j<<".\n";
        is_valid[j] = true;
        mean+=vec[j];
        ++n;
      }else{
        //cerr<<"Found "<<s<<" at row "<<row<<" col "<<j<<".\n";
        is_valid[j] = false;
      }
      //iss>>vec[j];
      //mean+=vec[j];
    }
    mean/=n;
    float sd = 0;
    for(int j=0;j<cols;++j){
      if(is_valid[j]){
        float dev = vec[j]-mean;
        sd+=dev*dev; 
      }
    }
    sd = sqrt(sd / (n-1));
    cerr<<"Row "<<row<<" mean is "<<mean<<" SD is "<<sd<<endl;
    for(int j=0;j<cols;++j){
      if(j) cout<<"\t";
      if(sd>0 && is_valid[j]){ 
        float s = (vec[j] - mean)/sd;
        //if (s<0) cerr<<"NEGATIVE!\n";
        cout<<s; 
      }else{
        cout<<"0";
      }
    }
    cout<<endl;
    ++row;
    
  }
  
  return 0;
}
